/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package upc.com.pc2;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;


/**
 *
 * @author JORGELUIS
 */
@Entity
@Table(name = "alumnos")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Alumnos.findAll", query = "SELECT a FROM Alumnos a"),
    @NamedQuery(name = "Alumnos.findStudents", query = "SELECT s FROM Alumnos s WHERE s.firstName = :firstName AND s.lastName = :lastName" ),
    @NamedQuery(name = "Alumnos.findByIdBooster", query = "SELECT a FROM Alumnos a WHERE a.idBooster = :idBooster"),
    @NamedQuery(name = "Alumnos.findByFirstName", query = "SELECT a FROM Alumnos a WHERE a.firstName = :firstName"),
    @NamedQuery(name = "Alumnos.findByLastName", query = "SELECT a FROM Alumnos a WHERE a.lastName = :lastName"),
    @NamedQuery(name = "Alumnos.findByBirthDate", query = "SELECT a FROM Alumnos a WHERE a.birthDate = :birthDate")})
public class Alumnos implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 4)
    @Column(name = "idBooster")
    private String idBooster;
    @Size(max = 45)
    @Column(name = "firstName")
    private String firstName;
    @Size(max = 45)
    @Column(name = "lastName")
    private String lastName;
    @Column(name = "birthDate")
    @Temporal(TemporalType.TIMESTAMP)
    private Date birthDate;

    public Alumnos() {
    }

    public Alumnos(String idBooster) {
        this.idBooster = idBooster;
    }

    public String getIdBooster() {
        return idBooster;
    }

    public void setIdBooster(String idBooster) {
        this.idBooster = idBooster;
    }

    public String getFirstName() {
        return firstName;
    }

    public void setFirstName(String firstName) {
        this.firstName = firstName;
    }

    public String getLastName() {
        return lastName;
    }

    public void setLastName(String lastName) {
        this.lastName = lastName;
    }

    public Date getBirthDate() {
        return birthDate;
    }

    public void setBirthDate(Date birthDate) {
        this.birthDate = birthDate;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idBooster != null ? idBooster.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Alumnos)) {
            return false;
        }
        Alumnos other = (Alumnos) object;
        if ((this.idBooster == null && other.idBooster != null) || (this.idBooster != null && !this.idBooster.equals(other.idBooster))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "upc.com.pc2.Alumnos[ idBooster=" + idBooster + " ]";
    }
    
}
